import cn.kgc.service.EmpService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    @Test
    public void getCount(){
        String path = "applicationContext-mybatis.xml";
        ApplicationContext cxt = new ClassPathXmlApplicationContext(path);
        System.out.println("----------连接："+cxt);
        EmpService emp = cxt.getBean("empservice", EmpService.class);
        System.out.println("----------哈哈哈EMP："+emp);
        int row=emp.getCount();
        System.out.println("数量："+row);
    }
}
